package pojo;

import javax.print.Doc;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

import DataAccess.BaseDA;

public class TinNhanPOJO  {
	private int id;
	private String nguoiGui;
	private String nguoiNhan;
	private String noiDung;
	private int tinhTrang;
	private long thoiGian;
	private int loai;
	
	public String getNguoiGui() {
		return nguoiGui;
	}
	public void setNguoiGui(String iDNguoiGui) {
		this.nguoiGui = iDNguoiGui;
	}
	public String getNguoiNhan() {
		return nguoiNhan;
	}
	public void setNguoiNhan(String idNguoiNhan) {
		this.nguoiNhan = idNguoiNhan;
	}
	public String getNoiDung() {
		return noiDung;
	}
	public void setNoiDung(String noiDung) {
		this.noiDung = noiDung;
	}
	public int getTinhTrang() {
		return tinhTrang;
	}
	public void setTinhTrang(int tinhTrang) {
		this.tinhTrang = tinhTrang;
	}
	public long getThoiGian() {
		return thoiGian;
	}
	public void setThoiGian(long thoiGian) {
		this.thoiGian = thoiGian;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getLoai() {
		return loai;
	}
	public void setLoai(int loai) {
		this.loai = loai;
	}
	public Element createXMLElement(Document doc){
		Element e=doc.createElement("TinNhan");
		e.setAttribute("ID", id+"");
		e.setAttribute("NguoiGui", nguoiGui+"");
		e.setAttribute("NguoiNhan", nguoiNhan+"");
		e.setAttribute("NoiDung", noiDung);
		e.setAttribute("TinhTrang", tinhTrang+"");
		e.setAttribute("ThoiGian", thoiGian+"");
		e.setAttribute("Loai", this.loai+"");
		return e;
	}
	
}
